home *** CD-ROM | disk | FTP | other *** search
- {*******************************************************
- PassLoad Unit
-
- This unit explicitly loads PASSWORD.DLL. Source
- to the DLL is available for $5.00 Cdn (if I can
- e-mail it).
-
-
- Paul Warren
- HomeGrown Software Development
- (c) 1996 Langley British Columbia.
- (604) 530-9097
- e-mail: hg_soft@uniserve.com
- Home page: http://haven.uniserve.com/~hg_soft
-
- ********************************************************}
-
- unit Passload;
-
- interface
-
- const
- PassWrdLoaded: Boolean = False; { presume nothing! }
-
- var
- Login: function(var UserN : String; IniFileName,SectionName: String): WordBool; { <--- THE BOOLEAN FUNCTION }
- UserName: String;
-
- implementation
- {$IFDEF WINDOWS}
- uses WinProcs;
- Const SEM_NoOpenFileErrorBox = $8000;
- {$ELSE}
- uses WinAPI;
- {$ENDIF}
-
- var
- SaveExit: pointer;
- DLLHandle: Word;
-
- procedure NewExit; far;
- begin
- ExitProc := SaveExit;
- FreeLibrary(DLLHandle)
- end {NewExit};
-
- begin
- {$IFDEF WINDOWS}
- SetErrorMode(SEM_NoOpenFileErrorBox);
- {$ENDIF}
- DLLHandle := LoadLibrary('PASSWORD.DLL');
- if DLLHandle >= 32 then
- begin
- PassWrdLoaded := True;
- SaveExit := ExitProc;
- ExitProc := @NewExit;
- @Login := GetProcAddress(DLLHandle,'LOGIN');
- end
- end.
-